home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / demoversionen / gage / include / devices / gagescope.h next >
C/C++ Source or Header  |  1995-03-09  |  3KB  |  93 lines

  1. #ifndef __DEVICES_GAGESCOPE_H
  2. #define __DEVICES_GAGESCOPE_H
  3. /*
  4. **      $Source: Devel:cs220/RCS/gagescope.h,v $
  5. **      $Author: tsarna $
  6. **    $Revision: 2.7 $
  7. **        $Date: 1994/08/10 18:51:37 $
  8. **
  9. **        Amiga Gage Driver support header
  10. **
  11. **    (C) Copyright 1994 Endicor Technologies, Inc.
  12. **        All Rights Reserved.
  13. */
  14.  
  15.  
  16. #ifndef   EXEC_IO_H
  17. #include <exec/io.h>
  18. #endif /* EXEC_IO_H */
  19.  
  20. #ifndef   EXEC_TASKS_H
  21. #include <exec/tasks.h>
  22. #endif /* EXEC_TASKS_H */
  23.  
  24.  
  25. /* Supported commands */
  26.  
  27. #define GAGECMD_READ       CMD_READ
  28. #define GAGECMD_FLUSH      CMD_FLUSH
  29. #define GAGECMD_QUERY      (CMD_NONSTD+0)
  30. #define GAGECMD_SETPARAMS  (CMD_NONSTD+1)
  31. #define GAGECMD_CONVERT    (CMD_NONSTD+2)
  32.  
  33.  
  34. /* Device names */
  35.  
  36. #define GNULLNAME     "gage_null.device"     /* no-hardware test driver */
  37. #define CSLITENAME    "gage_cslite.device"   /* unsupported             */
  38. #define CS220NAME     "gage_cs220.device"    /* CompuScope 220          */
  39. #define CS250NAME     "gage_cs250.device"    /* unsupported             */
  40. #define CS1012NAME    "gage_cs1012.device"   /* unsupported             */
  41.  
  42.  
  43. /* Gage-specific error codes */
  44.  
  45. #define GageErr_NoData  1     /* CMD_READ when no valid data to return */
  46.  
  47.  
  48. /* NOTE: C_25MHz/C_50MHz/C_100MHz only on CS250, C_40MHz only on CS220 */
  49.  
  50. typedef short enum _GageClock {
  51.    C_1Hz, C_2Hz, C_5Hz, C_10Hz, C_20Hz, C_50Hz,
  52.    C_100Hz, C_200Hz, C_500Hz, C_1KHz, C_2KHz, C_5KHz,
  53.    C_10KHz, C_20KHz, C_50KHz, C_100KHz, C_200KHz, C_500KHz,
  54.    C_1MHz, C_2MHz, C_5MHz, C_10MHz, C_20MHz, C_25MHz, C_40MHz,
  55.    C_50MHz, C_100MHz
  56. } GageClock;
  57.  
  58.  
  59. /* NOTE: external trigger only supports V_5v and V_1v */
  60.  
  61. typedef short enum _GageVoltage {
  62.    V_100mv, V_200mv, V_500mv, V_1v, V_2v, V_5v
  63. } GageVoltage;
  64.  
  65. typedef short enum _GageCoupling { DC, AC } GageCoupling;
  66.  
  67. typedef short enum _GageSlope { positive, negative } GageSlope;
  68.  
  69. typedef short enum _GageChannel {
  70.    CH_A, CH_B, CH_EXTERNAL, AUTOTRIG, SOFTTRIG
  71. } GageChannel;
  72.  
  73.  
  74. typedef struct _GageConfig {
  75.    BOOL              gc_Skip[2];       /* channels to skip (not read)      */
  76.    short             gc_Points;        /* get this many samples            */
  77.    short             gc_Off[2];        /* where to start relative to trig. */
  78.    short             gc_Adjust[2];     /* adjust values by this amount     */
  79.    GageClock         gc_Clock;         /* sampling rate                    */
  80.    GageVoltage       gc_Volts[3];      /* voltage range, +/-, A/B/EXTERNAL */
  81.    GageCoupling      gc_Coupling[3];   /* coupling for A/B/EXTERNAL        */
  82.    short             gc_TrigLevel;     /* trigger level 0-255              */
  83.    GageSlope         gc_TrigSlope;     /* positive/negative                */
  84.    GageChannel       gc_TrigSource;    /* trigger source                   */
  85.    UBYTE             gc_BitsPerSamp;   /* Read Only: number of bits/sample */
  86.    BYTE              gc_TaskPri;       /* Priority of service task         */
  87.  
  88.    ULONG             gc_Reserved[8];   /* For future expansion             */
  89. } GageConfig;
  90.  
  91.  
  92. #endif /* __DEVICES_GAGESCOPE_H */
  93.